<?php namespace xlx;

//监视服务添加一个监视（init在进程池）
class DbScheduler
{ 
    //同步返回class名称
    public static function start($class_name,$args)
    {
        \xlx\AChannel::make($actor,$s)->then(function()use(&$actor,&$s,$class_name,$args){
            yield $actor->send('danboo.sch',['start',$class_name,$args]); 
        });
        return $class_name;
    }    
    //异步等待返回coid
    public static function spawn($fn,$args)
    {
        yield \xlx\AChannel::make($actor,$s);
        yield $actor->send('danboo.sch',['spawn',$fn,$args,$actor->self()]); 
        return yield $self->receive();
    }
 
    public function init($actor,$args){
        
    }
}